﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PSUA_RideSharing.ORM;

namespace PSUA_RideSharing.Pages.MyAccount
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RideShareEntities1 db = new RideShareEntities1();
            tblMonday mon = new tblMonday();

            if (Session["username"] != null)
            {

            var monday = from m in db.tblMondays
                          where Session["username"].ToString() == m.fldUserID
                          select m;

            mon = (tblMonday)monday;
                    monArr.Value = mon.fldArrival.ToString();
                    monDep.Value = mon.fldDeparture.ToString();
                    //monArr.SelectedIndex = 4;
                    //monDep.SelectedIndex = 14;
            }
        }

        protected void btnUpdateInfo_Click(object sender, EventArgs e)
        {
            RideShareEntities1 entities = new RideShareEntities1();

            foreach (var m in this.Controls)
            {
                if (m is TextBox)
                {
                    if (m.ToString() != null)
                    {

                    }
                }
            }
        }
    }
}